package com.ruoyi.wbgame.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wbgame.mapper.WbQuestionTypeMapper;
import com.ruoyi.wbgame.domain.WbQuestionType;
import com.ruoyi.wbgame.service.IWbQuestionTypeService;
import com.ruoyi.common.core.text.Convert;

/**
 * 题目类型Service业务层处理
 * 
 * @author guguofu
 * @date 2021-04-17
 */
@Service
public class WbQuestionTypeServiceImpl implements IWbQuestionTypeService 
{
    @Autowired
    private WbQuestionTypeMapper wbQuestionTypeMapper;

    /**
     * 查询题目类型
     * 
     * @param typeId 题目类型ID
     * @return 题目类型
     */
    @Override
    public WbQuestionType selectWbQuestionTypeById(Long typeId)
    {
        return wbQuestionTypeMapper.selectWbQuestionTypeById(typeId);
    }

    /**
     * 查询题目类型列表
     * 
     * @param wbQuestionType 题目类型
     * @return 题目类型
     */
    @Override
    public List<WbQuestionType> selectWbQuestionTypeList(WbQuestionType wbQuestionType)
    {
        return wbQuestionTypeMapper.selectWbQuestionTypeList(wbQuestionType);
    }

    /**
     * 新增题目类型
     * 
     * @param wbQuestionType 题目类型
     * @return 结果
     */
    @Override
    public int insertWbQuestionType(WbQuestionType wbQuestionType)
    {
        return wbQuestionTypeMapper.insertWbQuestionType(wbQuestionType);
    }

    /**
     * 修改题目类型
     * 
     * @param wbQuestionType 题目类型
     * @return 结果
     */
    @Override
    public int updateWbQuestionType(WbQuestionType wbQuestionType)
    {
        return wbQuestionTypeMapper.updateWbQuestionType(wbQuestionType);
    }

    /**
     * 删除题目类型对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteWbQuestionTypeByIds(String ids)
    {
        return wbQuestionTypeMapper.deleteWbQuestionTypeByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除题目类型信息
     * 
     * @param typeId 题目类型ID
     * @return 结果
     */
    @Override
    public int deleteWbQuestionTypeById(Long typeId)
    {
        return wbQuestionTypeMapper.deleteWbQuestionTypeById(typeId);
    }
}
